package mobi.hami.huapin.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import io.swagger.models.auth.In;
import mobi.hami.huapin.daobase.CrudMapper;
import mobi.hami.huapin.model.CreateNoteAudit;
import mobi.hami.huapin.model.CreateNoteAuditExample;
import mobi.hami.huapin.model.NoteSchedule;
import mobi.hami.huapin.model.NoteSort;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface CreateNoteAuditMapper extends CrudMapper<CreateNoteAudit> {


    @SelectProvider(type = CreateNoteAuditProvider.class,method = "selectWitchParam")
    List<CreateNoteAudit> selectWitchParam(Map<String,Object> parms);


    /**
     * @param id
     * @param status
     * @param audit_user_id
     * @param audit_time
     * @param audit_comment
     * @return
     */
    @Update("update create_note_audit set status = #{status},audit_user_id = #{audit_user_id},audit_time = #{audit_time},audit_comment = #{audit_comment} where id = #{id}")
    int updateStatus(@Param("id") Integer id,@Param("status") Integer status,@Param("audit_user_id") Integer audit_user_id,@Param("audit_time") Date audit_time,@Param("audit_comment") String audit_comment);


}